package com.itheima.demo.demo07;


import java.util.concurrent.CompletionService;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class CS {
    public static void main(String[] args) {
        ExecutorService ex= Executors.newFixedThreadPool(4);
       ex .submit(()->{
           System.out.println("代码执行"+" "+Thread.currentThread().getName());
       });
        ex .submit(()->{
            System.out.println("代码执行"+" "+Thread.currentThread().getName());
        });
        ex .submit(()->{
            System.out.println("代码执行"+" "+Thread.currentThread().getName());
        });
        ex .submit(()->{
            System.out.println("代码执行"+" "+Thread.currentThread().getName());
        });




    }
}
